Skip to content

[c++] Create C++ bindings for log filter pushdown - #4036

Open
naivedogger wants to merge 4 commits into
apache:mainfrom
naivedogger:feature/cpp-binding-for-predicate-pushdown
Open

[c++] Create C++ bindings for log filter pushdown#4036
naivedogger wants to merge 4 commits into
apache:mainfrom
naivedogger:feature/cpp-binding-for-predicate-pushdown

Conversation

@naivedogger

Copy link
Copy Markdown
Contributor

Purpose

Linked issue: close #4035

Brief change log

Tests

API and Format

Documentation

@naivedogger
naivedogger marked this pull request as draft August 18, 2026 15:05
@naivedogger naivedogger changed the title [c++] Create C++ bindings for log predicate pushdown [c++] Create C++ bindings for log filter pushdown Aug 19, 2026
@naivedogger
naivedogger marked this pull request as ready for review August 26, 2026 02:15
@naivedogger

Copy link
Copy Markdown
Contributor Author

Thanks @leekeiabstraction for wiring batch statistics into the Rust client! This PR is now ready for review, @fresh-borzoni @charlesdong1991 @leekeiabstraction, appreciate a review when you have time 🙏

@fresh-borzoni fresh-borzoni left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@naivedogger Thank you for the PR, left some quick comments, PTAL

Also don't forget to rebase, and ping me for another look, please 🙌

PredicateLiteral(Time value);

static PredicateLiteral Null();
static PredicateLiteral Decimal(std::string value);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nothing tests the Decimal or Timestamp literals, including the check that rejects a literal the column's scale can't hold exactly.
Add a case for both, accepted and rejected?

/// explicit factories below to preserve their Fluss logical type.
class PredicateLiteral {
public:
PredicateLiteral(bool value);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Equal(5) compiles but Equal(5L) and Equal(5u) are ambiguous across the five numeric ctors, I checked with clang.
Add overloads for long and unsigned, or make it a template?

Comment thread fluss-rust/bindings/cpp/src/table.cpp Outdated

namespace {

enum class PredicateLeafFunction : int32_t {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This duplicates the Rust decoder's mapping, and only GreaterThan, StartsWith and And are covered by tests. Inserting an operator in either list mis-maps the rest silently.

cxx can generate the C++ enum from a shared enum in the bridge, so there'd be one list instead of two. function carries both leaf and compound codes today, so it needs splitting first.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@naivedogger
naivedogger force-pushed the feature/cpp-binding-for-predicate-pushdown branch from d5d720b to ecb216d Compare August 27, 2026 07:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[c++] Create C++ bindings for log filter pushdown

3 participants